home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
NeXTSTEP 3.3 (Developer)…68k, x86, SPARC, PA-RISC]
/
NeXTSTEP 3.3 Dev Intel.iso
/
NextDeveloper
/
Headers
/
appkit
/
Font.h
< prev
next >
Wrap
Text File
|
1992-09-11
|
4KB
|
117 lines
/*
Font.h
Application Kit, Release 2.1J
Copyright (c) 1988, 1989, 1990, NeXT, Inc. All rights reserved.
*/
#ifndef FONT_H
#define FONT_H
#import <objc/Object.h>
#import <objc/hashtable.h>
#import "afm.h"
#define NX_IDENTITYMATRIX ((float *) 0)
#define NX_FLIPPEDMATRIX ((float *) -1)
/*
* Figure is also known as non-breaking space.
* NX_EMSPACE, NX_ENSPACE and NX_THINSPACE have been removed as part of
* the switch to the NextStep encoding.
*/
#define NX_FIGSPACE ((unsigned short)0x80)
typedef struct _NXFaceInfo {
NXFontMetrics *fontMetrics; /* Information from afm file */
int flags; /* Which font info is present */
struct _fontFlags { /* Keep track of font usage
* for Conforming PS comments */
unsigned int usedInDoc:1; /* has font been used in doc? */
unsigned int usedInPage:1; /* has font been used in page? */
unsigned int usedInSheet:1; /* has font been used in sheet? */
unsigned int _PADDING:13;
} fontFlags;
struct _NXFaceInfo *nextFInfo; /* next faceInfo in the list */
} NXFaceInfo;
@interface Font : Object
{
NXAtom name;
float size;
int style;
float *matrix;
int fontNum;
NXFaceInfo *faceInfo;
id otherFont;
struct _fFlags {
#ifdef __BIG_ENDIAN__
/* the following two instance variables are no longer part of the API */
unsigned int usedByWS:1;
unsigned int usedByPrinter:1;
unsigned int isScreenFont:1;
unsigned int _systemFontType:4;
unsigned int _RESERVED:6;
unsigned int _matrixIsIdentity:1;
unsigned int _matrixIsFlipped:1;
unsigned int _hasStyle:1;
#else
unsigned int _hasStyle:1;
unsigned int _matrixIsFlipped:1;
unsigned int _matrixIsIdentity:1;
unsigned int _RESERVED:6;
unsigned int _systemFontType:4;
unsigned int isScreenFont:1;
/* the following two instance variables are no longer part of the API */
unsigned int usedByPrinter:1;
unsigned int usedByWS:1;
#endif
} fFlags;
unsigned short _reservedFont2;
unsigned int _reservedFont3;
}
+ initialize;
+ allocFromZone:(NXZone *)zone;
+ newFont:(const char *)fontName size:(float)fontSize style:(int)fontStyle matrix:(const float *)fontMatrix;
+ newFont:(const char *)fontName size:(float)fontSize;
+ newFont:(const char *)fontName size:(float)fontSize matrix:(const float *)fontMatrix;
+ useFont:(const char *)fontName;
+ userFontOfSize:(float)fontSize matrix:(const float *)fontMatrix;
+ userFixedPitchFontOfSize:(float)fontSize matrix:(const float *)fontMatrix;
+ systemFontOfSize:(float)fontSize matrix:(const float *)fontMatrix;
+ boldSystemFontOfSize:(float)fontSize matrix:(const float *)fontMatrix;
+ setUserFont:(Font *)aFont;
+ setUserFixedPitchFont:(Font *)aFont;
- awake;
- free;
- (float)pointSize;
- (const char *)name;
- (const char *)familyName;
- (const char *)displayName;
- (int)fontNum;
- (int)style;
- setStyle:(int)aStyle;
- (const float *)matrix;
- (NXFontMetrics *)metrics;
- (NXFontMetrics *)readMetrics:(int)flags;
- (BOOL)hasMatrix;
- set;
- (float)getWidthOf:(const char *)string;
- screenFont;
- finishUnarchiving;
- write:(NXTypedStream *)stream;
- read:(NXTypedStream *)stream;
#ifdef KANJI
- (int)mappingScheme;
- (BOOL)isBaseFont;
- (char *)characterSet;
#endif KANJI
@end
#endif FONT_H